home *** CD-ROM | disk | FTP | other *** search
- Subject: Re: Colour.
- Date: Tue, 31 May 1994 10:15:02 +1000
- From: Warwick Allison <warwick@cs.uq.oz.au>
- Precedence: bulk
-
- In message <199405301254.OAA04628@blade.stack.urc.tue.nl>, you wrote:
- >Warwick wrote:
- >
- >> - The standard 16 colours
- >> - When should a user desire to change them?
- >
- >In my opinion a user will never want to change that standard 16 colours.
- >But users do want to change the colour of certain objects on screen.
-
- Here's when they will:
-
- - When they don't like having a bright green desktop.
- - When they want more subtle colours for window elements.
-
- I changed my palette for exactly these reasons. The changes where minimal
- and all colour icons still look fine.
-
-
- >The least thing that should be added is that there is some way for other
- >programs (or a central colour manager) to find out that the application
- >has changed the palette or something that registers a program in a
- >systemwide database as 'colour-aware' so that other programs know that
- >those applications are well-behaved.
-
- Hmm.... this may be a good idea.
-
- The problem at the moment is that the only way an application can check if
- the palette has changed is to look at every colour - useless. If there was
- a vdi call which returned the last TIME the palette was changed (or even just
- some number that changes when the palette changes [eg. increases by 1]), then
- a program could very regularly check this state and compare it with the last
- state it recorded.
-
- I'm very keen on this idea. It should work very well, and supports older
- applications.
-
- Who should be responsible for changing this `last-change' value? Libraries?
- The VDI? (if it was the VDI, then it would work for old apps)
-
- Usage:
-
- restore_palette()
- {
- static int remember=0;
- if (remember!=palette_change_number()) {
- set_palette(...) /* increments palette_change_number */
- remember=palette_change_number()
- }
- }
-
- --
- Warwick
-